using Newtonsoft.Json;

namespace BabyCloudDrives.DesktopApp.Models
{
    [JsonObject(MemberSerialization.OptIn)]
    public class SkyDriveQuota
    {
        [JsonProperty("quota")]
        public long Quota { get; set; }

        [JsonProperty("available")]
        public long Available { get; set; }

        [JsonIgnore]
        public long QuotaVal
        {
            get { return Quota/1024000; }
        }

        [JsonIgnore]
        public long AvailableVal
        {
            get { return Available/1024000; }
        }

        [JsonIgnore]
        public float UsedPercentage
        {
            get { return (float) Available/Quota; }
        }
    }
}